package com.atguigu.gulimail.member.config;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Guo 2022/9/1 16:23:18
 */
@Configuration
public class RibbonRuleConfig {

    @Bean
    @LoadBalanced
    public IRule myRule(){
        return new RandomRule();
    }
}
